package cn.ycxy.lbl.member;

import cn.ycxy.lbl.common.config.CsCommonConfiguration;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.web.client.RestTemplate;

@EnableDubbo
@SpringBootApplication(scanBasePackages = "cn.ycxy.lbl.member.**")
@Import({CsCommonConfiguration.class})
/*
    @ComponentScan这个是 Spring 框架的注解，它用来指定组件扫描路径，
    如果用这个注解，它的值必须包含整个工程中全部需要扫描的路径。因为它会覆盖 SpringBootApplication 的默认扫描路径，导致其失效。
 */
//@ComponentScan({"cn.ycxy.lbl.member.security.**"})
public class MemberApplication {

    public static void main(String[] args) {
        SpringApplication.run(MemberApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate(){return new RestTemplate();}
}
